﻿using System;
using System.Data;
using System.IO;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.hrms.manage
{
    public partial class export2 : ModulePage
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            string path = Server.MapPath("/attachment/temp/hrms_" + base.User.Identity.Name + ".xls");
            if (File.Exists(path))
            {
                Response.ContentType = "application/octet-stream";
                Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("人事档案.xls", Encoding.UTF8));
            }
            Response.Clear();
            Response.Buffer = true;
            Response.WriteFile(path);
        }

    }
}
